package com.mashensoft;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.opensymphony.xwork2.ActionSupport;
@Namespace("/mashen")
@Action(value="user1")
@Results({@Result(name="success" ,location="/UserMsg.jsp")})
public class UserAction extends ActionSupport {
	private User user;
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String execute() throws Exception {
		System.out.println(666);
		System.out.println(user.getName());
		System.out.println(user.getPassword());
		System.out.println(user.getAge());
		return SUCCESS;
	}
}
